package com.mall.b2c.domain.order;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mall.b2c.enums.LogType;
import com.mall.common.domain.BaseEntity;

/**
 * 订单日志
 */
@Entity
@Table(name = "b2c_order_log")
public class OrderLogDomain extends BaseEntity {

	private static final long serialVersionUID = 6865633929543859090L;
	private String logText;// 日志内容
	private String operator;// 操作人
	private String operatorType;//操作人身份
	private LogType logType;// 日志类型
	private OrderDomain order;// 订单

	public OrderLogDomain(String logText, String operator,
			LogType logType, OrderDomain order, String operatorType) {
		super();
		this.logText = logText;
		this.operator = operator;
		this.logType = logType;
		this.order = order;
		this.operatorType = operatorType;
	}

	public OrderLogDomain() {
		super();
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="order_id")
	public OrderDomain getOrder() {
		return order;
	}

	public void setOrder(OrderDomain order) {
		this.order = order;
	}

	public String getLogText() {
		return logText;
	}

	public void setLogText(String logText) {
		this.logText = logText;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public LogType getLogType() {
		return logType;
	}

	public void setLogType(LogType logType) {
		this.logType = logType;
	}

	public String getOperatorType() {
		return operatorType;
	}

	public void setOperatorType(String operatorType) {
		this.operatorType = operatorType;
	}

}
